package com.yn.xr.middleware.user.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import com.github.pagehelper.PageHelper;
import com.yn.core.service.impl.BaseServiceImpl;
import com.yn.xr.common.page.Page;
import com.yn.xr.common.page.PageInfoToPage;
import com.yn.xr.middleware.user.service.UserLoginLogService;
import com.yn.xr.user.dao.UserLoginLogDao;
import com.yn.xr.user.mode.UserLoginLog;

@SuppressWarnings({ "rawtypes", "unchecked" })
public class UserLoginLogServiceImpl extends BaseServiceImpl<UserLoginLog, Long> implements UserLoginLogService{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Resource
    private UserLoginLogDao userLoginLogDao;
	
	/**
	  * 会员登陆记录查询接口
	  * @description
	  * @fileName:WithdrawRecordMapper.java
	  * @createTime:2015年7月14日
	  * @param parameters
	  * @return
	  * @throws Exception
	  * @author:yangjun
	  * @version:1.0.0
	  */	
	@Override
	public Page<UserLoginLog> queryUserLoginLogPage(int pageNo, int pageSize, UserLoginLog userLoginLog) throws Exception {
		//设置分页
    	PageHelper.startPage(pageNo, pageSize);
    	//查询数据库
    	List list = userLoginLogDao.findByEntity(userLoginLog);
    	//分页对象转换
    	Page<UserLoginLog> page = PageInfoToPage.toPage(list);
    	return page;
	}

}
